#include "stm32f10x.h"                  // Device header
#include "PWM.h"
#include "IC.h"
#include "OLED.h"

int main()
{
	PWM_Init();
	OLED_Init();
	IC_Init();
	PWM_SetPrescaler(72 - 1);
	PWM_SetCompare(20);
	
	OLED_ShowString(1, 1, "Fre:");
	OLED_ShowString(2, 1, "Dut:");
	while(1)
	{
		OLED_ShowNum(1, 5, IC_GetFrequency(), 6);
		OLED_ShowNum(2, 5, IC_GetDuty(), 3);
	}
}
8